<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // var i=1;
        // for(var i=1;i<=9;i++){
        //     for(var j=1;j<=i;j++){
        //         document.write(j+"*"+i+"="+(i*j));
        //         document.write("&nbsp;&nbsp;&nbsp;"); // 添加空格
        //     }
        //     document.writeln("<hr>"); // 换行
        // }
        var arr=["北京","上海","广州","深圳"];
        document.write("<ul>");
        for(var index in arr){
            document.writeln("<li>"+arr[index]+"</li>");
            console.log(index);
        }
        document.write("</ul>");
    </script>
</head>
<body>
    
</body>
</html>